apiVersion: packaging.carvel.dev/v1alpha1
kind: Package
metadata:
  name: harbor.tanzu.vmware.com.9.1.0.0.25370929
spec:
  refName: harbor.tanzu.vmware.com
  version: 9.1.0.0.25370929
  template:
    spec:
      fetch:
        - imgpkgBundle:
            image: depot.kube-system.svc/vcf/vcf-service-harbor/ga/9.1.0.0/harbor:9.1.0.0.25370929
      template:
        - ytt:
            paths: ["config/"]
      deploy:
        - kapp: {}
  valuesSchema:
    openAPIv3:
      title: regional-harbor values schema
      properties:
        system:
          type: object
          description: VCF Service Autowired Properties.
          required:
            - vcfDepotFqdn
            - vcfDepotCaChain
          properties:
            vcfDepotFqdn:
              type: string
              description: VCF Depot FQDN required for post installation proxy configuration. Works in combination with vmciRelayProxy.
              default: vcf-depot.kube-system.svc
            vcfDepotCaChain:
              type: string
              description: VCF Depot CA certificate chain required for TLS verification when connecting to the depot service.
              default: ""
        regions:
          description: Collection of Regional Harbor configurations.
          type: array
          items:
            type: object
            properties:
              hostSupervisor:
                description: The name of the Harbor hosting supervisor for the region.
                type: object
                properties:
                  namespace:
                    type: string
                    description: The namespace to install Harbor.
                    default: tanzu-system-registry
                  hostname:
                    type: string
                    description: The FQDN for accessing Harbor admin UI and Registry service.
                    default: harbor.yourdomain.com
                  port:
                    type: object
                    description: Port related configuration.
                    properties:
                      https:
                        type: integer
                        description: The network port of the Envoy service in Contour or other Ingress Controller.
                        default: 443
                  logLevel:
                    type: string
                    description: The log level of core, exporter, jobservice, registry.
                    default: info
                    enum:
                      - debug
                      - info
                      - warning
                      - error
                      - fatal
                  priorityClassName:
                    type: string
                    description: The priority class name for all harbor pods
                  tlsCertificate:
                    type: object
                    nullable: true
                    description: The tls certificate for the harbor FQDN.
                    properties:
                      signingSettings:
                        type: object
                        nullable: true
                        description: The signing settings for the TLS certificate.
                        properties:
                          additionalDnsNames:
                            type: array
                            description: The DNS names, in addition to hostname in values.yaml, to be included in the TLS certificate SAN.
                            default: []
                            items:
                              type: string
                          ipAddresses:
                            type: array
                            description: The IP addresses to be included in the TLS certificate SAN.
                            default: []
                            items:
                              type: string
                  harborAdminPassword:
                    type: string
                    description: The initial password of Harbor admin.
                  secretKey:
                    type: string
                    description: The secret key used for encryption. Must be a string of 16 chars.
                  database:
                    type: object
                    description: Database component related configuration.
                    required:
                      - password
                      - type
                    properties:
                      type:
                        type: string
                        description: The type of postgres dabasbase, either internal as default , or external
                        default: internal
                      password:
                        type: string
                        description: The initial password of the internal postgres database.
                      external:
                        type: object
                        nullable: true
                        description: external database configurations
                        required:
                          - host
                          - port
                          - password
                          - username
                          - coreDatabase
                        properties:
                          host:
                            type: string
                            description: The hostname for external database
                          port:
                            type: string
                            description: The port for external database
                            default: "5432"
                          username:
                            type: string
                            description: The username for external database
                            default: "postgres"
                          password:
                            type: string
                            description: The password for external database
                          coreDatabase:
                            type: string
                            description: The db name for external database
                            default: "registry"
                          sslmode:
                            type: string
                            description: sslmode for external database
                            default: "disable"
                      shmSizeLimit:
                        type: integer
                        description: The initial value of shmSizeLimit
                      maxIdleConns:
                        type: integer
                        description: The initial value of maxIdleConns
                      maxOpenConns:
                        type: integer
                        description: The initial value of maxOpenConns
                  exporter:
                    type: object
                    description: The configuration related to exporter.
                    properties:
                      cacheDuration:
                        type: integer
                        description: The initial value of cacheDuration.
                  core:
                    type: object
                    description: Core component related configuration.
                    required:
                      - secret
                      - xsrfKey
                    properties:
                      replicas:
                        type: integer
                        description: The replicas for the core component.
                        default: 1
                      secret:
                        type: string
                        description: Secret is used when core server communicates with other components.
                      xsrfKey:
                        type: string
                        description: The XSRF key. Must be a string of 32 chars.
                  jobservice:
                    type: object
                    description: Jobservice component related configuration.
                    required:
                      - secret
                    properties:
                      replicas:
                        type: integer
                        description: The replicas for the jobservice component.
                        default: 1
                      secret:
                        type: string
                        description: Secret is used when job service communicates with other components.
                      registryHttpClientTimeout:
                        type: integer
                        description: The request timeout for registry http client
                  registry:
                    type: object
                    description: Registry component related configuration.
                    required:
                      - secret
                    properties:
                      replicas:
                        type: integer
                        description: The replicas for the registry component.
                        default: 1
                      secret:
                        type: string
                        description: Secret is used to secure the upload state from client and registry storage backend.
                  trivy:
                    type: object
                    description: Trivy component related configuration.
                    properties:
                      enabled:
                        type: boolean
                        description: Whether to install Trivy scanner.
                        default: true
                      replicas:
                        type: integer
                        description: The replicas for the trivy component.
                        default: 1
                      gitHubToken:
                        type: string
                        description: the GitHub access token to download Trivy DB.
                        default: ""
                      skipUpdate:
                        type: boolean
                        description: The flag to disable Trivy DB downloads from GitHub.
                        default: false
                      offlineScan:
                        type: boolean
                        description: The offlineScan option prevents Trivy from sending API requests to identify dependencies.
                        default: false
                      timeout:
                        type: string
                        description: The timeout set for trivy scanner, it should be a number followed by a letter like "h", "m", "s", or "ms", i.e. 1h, 5m, 60s, 1000ms.
                        default: ""
                      tmpdir:
                        type: string
                        description: If /tmp doesn't work for you, you can change it by setting this environment variable. Normally would be /home/scanner
                        default: ""
                  persistence:
                    type: object
                    description: |-
                      The persistence is always enabled and a default StorageClass
                      is needed in the k8s cluster to provision volumes dynamically.
                      Specify another StorageClass in the "storageClass" or set "existingClaim"
                      if you have already existing persistent volumes to use

                      For storing images and charts, you can also use "azure", "gcs", "s3",
                      "swift" or "oss". Set it in the "imageChartStorage" section
                    properties:
                      persistentVolumeClaim:
                        type: object
                        description: PersistentVolumeClaim related configuration.
                        properties:
                          registry:
                            type: object
                            description: PersistentVolumeClaim related configuration for registry component.
                            properties:
                              existingClaim:
                                type: string
                                description: |-
                                  Use the existing PVC which must be created manually before bound,
                                  and specify the "subPath" if the PVC is shared with other components
                                default: ""
                              storageClass:
                                type: string
                                description: |-
                                  Specify the "storageClass" used to provision the volume. Or the default
                                  StorageClass will be used(the default).
                                  Set it to "-" to disable dynamic provisioning
                                default: ""
                              subPath:
                                type: string
                                description: The "subPath" if the PVC is shared with other components.
                                default: ""
                              accessMode:
                                type: string
                                description: Access mode of the PVC.
                                default: ReadWriteOnce
                              size:
                                type: string
                                description: Size of the PVC.
                                default: 10Gi
                          jobservice:
                            type: object
                            description: PersistentVolumeClaim related configuration for jobservice component.
                            properties:
                              jobLog:
                                type: object
                                description: PersistentVolumeClaim for jobservice log
                                properties:
                                  existingClaim:
                                    type: string
                                    description: |-
                                      Use the existing PVC which must be created manually before bound,
                                      and specify the "subPath" if the PVC is shared with other components
                                    default: ""
                                  storageClass:
                                    type: string
                                    description: |-
                                      Specify the "storageClass" used to provision the volume. Or the default
                                      StorageClass will be used(the default).
                                      Set it to "-" to disable dynamic provisioning
                                    default: ""
                                  subPath:
                                    type: string
                                    description: The "subPath" if the PVC is shared with other components.
                                    default: ""
                                  accessMode:
                                    type: string
                                    description: Access mode of the PVC.
                                    default: ReadWriteOnce
                                  size:
                                    type: string
                                    description: Size of the PVC.
                                    default: 1Gi
                          database:
                            type: object
                            description: PersistentVolumeClaim related configuration for database component.
                            properties:
                              existingClaim:
                                type: string
                                description: |-
                                  Use the existing PVC which must be created manually before bound,
                                  and specify the "subPath" if the PVC is shared with other components
                                default: ""
                              storageClass:
                                type: string
                                description: |-
                                  Specify the "storageClass" used to provision the volume. Or the default
                                  StorageClass will be used(the default).
                                  Set it to "-" to disable dynamic provisioning
                                default: ""
                              subPath:
                                type: string
                                description: The "subPath" if the PVC is shared with other components.
                                default: ""
                              accessMode:
                                type: string
                                description: Access mode of the PVC.
                                default: ReadWriteOnce
                              size:
                                type: string
                                description: Size of the PVC.
                                default: 1Gi
                          redis:
                            type: object
                            description: PersistentVolumeClaim related configuration for redis component.
                            properties:
                              existingClaim:
                                type: string
                                description: |-
                                  Use the existing PVC which must be created manually before bound,
                                  and specify the "subPath" if the PVC is shared with other components
                                default: ""
                              storageClass:
                                type: string
                                description: |-
                                  Specify the "storageClass" used to provision the volume. Or the default
                                  StorageClass will be used(the default).
                                  Set it to "-" to disable dynamic provisioning
                                default: ""
                              subPath:
                                type: string
                                description: The "subPath" if the PVC is shared with other components.
                                default: ""
                              accessMode:
                                type: string
                                description: Access mode of the PVC.
                                default: ReadWriteOnce
                              size:
                                type: string
                                description: Size of the PVC.
                                default: 1Gi
                          trivy:
                            type: object
                            description: PersistentVolumeClaim related configuration for redis component.
                            properties:
                              existingClaim:
                                type: string
                                description: |-
                                  Use the existing PVC which must be created manually before bound,
                                  and specify the "subPath" if the PVC is shared with other components
                                default: ""
                              storageClass:
                                type: string
                                description: |-
                                  Specify the "storageClass" used to provision the volume. Or the default
                                  StorageClass will be used(the default).
                                  Set it to "-" to disable dynamic provisioning
                                default: ""
                              subPath:
                                type: string
                                description: The "subPath" if the PVC is shared with other components.
                                default: ""
                              accessMode:
                                type: string
                                description: Access mode of the PVC.
                                default: ReadWriteOnce
                              size:
                                type: string
                                description: Size of the PVC.
                                default: 5Gi
                      imageChartStorage:
                        type: object
                        description: |-
                          Define which storage backend is used for registry and chartmuseum to store
                          images and charts. Refer to
                          https://github.com/docker/distribution/blob/master/docs/configuration.md#storage
                          for the detail.
                        properties:
                          disableredirect:
                            type: boolean
                            description: |-
                              Specify whether to disable `redirect` for images and chart storage, for
                              backends which not supported it (such as using minio for `s3` storage type), please disable
                              it. To disable redirects, simply set `disableredirect` to `true` instead.
                              Refer to
                              https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect
                              for the detail.
                            default: false
                          "type":
                            type: string
                            description: |-
                              Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift",
                              "oss" and fill the information needed in the corresponding section. The type
                              must be "filesystem" if you want to use persistent volumes for registry
                              and chartmuseum
                            default: filesystem
                          filesystem:
                            type: object
                            nullable: true
                            description: Filesystem storage related configuration.
                            properties:
                              rootdirectory:
                                type: string
                                description: The rootdirectory in filesystem.
                                default: /storage
                          azure:
                            type: object
                            nullable: true
                            description: Azure storage related configuration.
                            required:
                              - accountname
                              - accountkey
                              - container
                            properties:
                              accountname:
                                type: string
                                description: Account name of azure storage.
                                default: accountname
                              accountkey:
                                type: string
                                description: Account key of azure storage.
                                default: base64encodedaccountkey
                              container:
                                type: string
                                description: Container name of azure storage.
                                default: containername
                              realm:
                                type: string
                                description: Realm for azure storage.
                                default: core.windows.net
                          gcs:
                            type: object
                            nullable: true
                            required:
                              - bucket
                              - encodedkey
                            properties:
                              bucket:
                                type: string
                                description: Bucket name of gcs.
                                default: bucketname
                              encodedkey:
                                type: string
                                description: The base64 encoded json file which contains the key
                                default: base64-encoded-json-key-file
                              rootdirectory:
                                type: string
                                description: The rootdirectory in gcs.
                                default: null
                              chunksize:
                                type: integer
                                description: Check size for gcs.
                                default: 5242880
                          s3:
                            type: object
                            nullable: true
                            required:
                              - region
                              - bucket
                            properties:
                              region:
                                type: string
                                description: Region of s3.
                                default: us-west-1
                              bucket:
                                type: string
                                description: Bucket name of s3.
                                default: bucketname
                              accesskey:
                                type: string
                                description: Access key of s3.
                                default: null
                              secretkey:
                                type: string
                                description: Secret key of s3.
                                default: null
                              regionendpoint:
                                type: string
                                description: Region endpoint of s3, eg http://myobjects.local
                                default: null
                              encrypt:
                                type: boolean
                                description: Encrypt for s3.
                                default: false
                              keyid:
                                type: string
                                description: Keyid of s3.
                                default: null
                              secure:
                                type: boolean
                                description: Secure for s3.
                                default: true
                              skipverify:
                                type: boolean
                                description: skipverify for s3.
                                default: false
                              v4auth:
                                type: boolean
                                description: Use v4auth for s3 when it's true.
                                default: true
                              chunksize:
                                type: integer
                                description: Check size for s3.
                                default: null
                              rootdirectory:
                                type: string
                                description: The rootdirectory in s3.
                                default: null
                              storageclass:
                                type: string
                                description: Storage class of s3.
                                default: STANDARD
                              multipartcopychunksize:
                                type: integer
                                description: multi part copy chunk size of s3.
                                default: null
                              multipartcopymaxconcurrency:
                                type: integer
                                description: multi part copy max concurrency of s3.
                                default: null
                              multipartcopythresholdsize:
                                type: integer
                                description: multi part copy threshold size of s3.
                                default: null
                          swift:
                            type: object
                            nullable: true
                            description: Swift storage related configuration.
                            required:
                              - authurl
                              - username
                              - password
                              - container
                            properties:
                              authurl:
                                type: string
                                description: Auth url of swift.
                                default: https://storage.myprovider.com/v3/auth
                              username:
                                type: string
                                description: Username of swift.
                                default: username
                              password:
                                type: string
                                description: Password of swift.
                                default: password
                              container:
                                type: string
                                description: Container of swift.
                                default: containername
                              region:
                                type: string
                                description: Region of swift.
                                default: null
                              tenant:
                                type: string
                                description: Tenant of swift.
                                default: null
                              tenantid:
                                type: string
                                description: Tenant id of swift.
                                default: null
                              domain:
                                type: string
                                description: Domain of swift.
                                default: null
                              domainid:
                                type: string
                                description: Domain id of swift.
                                default: null
                              trustid:
                                type: string
                                description: Trust id of swift.
                                default: null
                              insecureskipverify:
                                type: boolean
                                description: Ignore the cert verify when it's true.
                                default: null
                              chunksize:
                                type: string
                                description: Check size of swift, eg 5M.
                                default: null
                              prefix:
                                type: string
                                description: Prefix path of swift.
                                default: null
                              secretkey:
                                type: string
                                description: Secret key of swift.
                                default: null
                              accesskey:
                                type: string
                                description: Access key of swift.
                                default: null
                              authversion:
                                type: string
                                description: Auth version of swift.
                                default: null
                              endpointtype:
                                type: string
                                description: Endpoint type of swift, eg public.
                                default: null
                              tempurlcontainerkey:
                                type: boolean
                                description: Use temp url container key of swift when it's true.
                                default: null
                              tempurlmethods:
                                type: string
                                description: Temp url methods of swift.
                                default: null
                          oss:
                            type: object
                            nullable: true
                            description: OSS storage related configuration.
                            required:
                              - accesskeyid
                              - accesskeysecret
                              - region
                              - bucket
                            properties:
                              accesskeyid:
                                type: string
                                description: Access key id of oss.
                                default: accesskeyid
                              accesskeysecret:
                                type: string
                                description: Access key secert of oss.
                                default: accesskeysecret
                              region:
                                type: string
                                description: Region of oss.
                                default: regionname
                              bucket:
                                type: string
                                description: Bucket name of oss.
                                default: bucketname
                              endpoint:
                                type: string
                                description: Endpoint of oss.
                                default: null
                              internal:
                                type: boolean
                                description: Use the internal endpoint when it's true.
                                default: null
                              encrypt:
                                type: boolean
                                description: Encrypt of oss.
                                default: null
                              secure:
                                type: boolean
                                description: Secure of oss.
                                default: null
                              chunksize:
                                type: string
                                description: Chunk size for the oss, eg 10M.
                                default: null
                              rootdirectory:
                                type: string
                                description: The rootdirectory in oss.
                                default: null
                  proxy:
                    type: object
                    nullable: true
                    description: The proxy related configuration.
                    properties:
                      httpProxy:
                        type: string
                        description: HTTP proxy URL.
                        default: ""
                      httpsProxy:
                        type: string
                        description: HTTPS proxy URL.
                        default: ""
                      noProxy:
                        type: string
                        description: Ignore proxy for the domains.
                        default: 127.0.0.1,localhost,.local,.internal
                  pspNames:
                    type: string
                    description: The PSP names used by Harbor pods. The names are separated by ','. 'null' means all PSP can be used.
                    default: "null"
                  metrics:
                    type: object
                    nullable: true
                    description: The metrics used by core, registry and exporter
                    properties:
                      enabled:
                        type: boolean
                        description: Enable the metrics when it's true
                        default: false
                      core:
                        type: object
                        description: The core component related configuration.
                        properties:
                          path:
                            type: string
                            description: The path of the metrics.
                            default: /metrics
                          port:
                            type: integer
                            description: The port of the metrics.
                            default: 8001
                      registry:
                        type: object
                        nullable: true
                        description: The registry component related configuration.
                        properties:
                          path:
                            type: string
                            description: The path of the metrics.
                            default: /metrics
                          port:
                            type: integer
                            description: The port of the metrics.
                            default: 8001
                      jobservice:
                        type: object
                        nullable: true
                        description: The jobservice component related configuration.
                        properties:
                          path:
                            type: string
                            description: The path of the metrics.
                            default: /metrics
                          port:
                            type: integer
                            description: The port of the metrics.
                            default: 8001
                      exporter:
                        type: object
                        nullable: true
                        description: The exporter component related configuration.
                        properties:
                          path:
                            type: string
                            description: The path of the metrics.
                            default: /metrics
                          port:
                            type: integer
                            description: The port of the metrics.
                            default: 8001
                  resources:
                    type: object
                    description: The resource requests and limits for Harbor namespace and containers.
                    properties:
                      namespaceLimitRange:
                        type: object
                        description: the resource Limit Range settings for the namespace where Harbor is installed.
                        properties:
                          defaultCPURequest:
                            type: string
                            description: The default CPU request for the namespace.
                            default: "200m"
                          defaultCPULimit:
                            type: string
                            description: The default CPU limit for the namespace.
                            default: "1000m"
                          defaultMemoryRequest:
                            type: string
                            description: The default memory request for the namespace.
                            default: "256Mi"
                          defaultMemoryLimit:
                            type: string
                            description: The default memory limit for the namespace.
                            default: "2Gi"
                      containers:
                        description: The resource requests and limits for Harbor containers.
                        type: array
                        default:
                          - name: core
                            cpuRequest: 500m
                            cpuLimit: 1000m
                            memoryRequest: 512Mi
                            memoryLimit: 2Gi
                          - name: database
                            cpuRequest: 1000m
                            cpuLimit: 2000m
                            memoryRequest: 1Gi
                            memoryLimit: 2Gi
                          - name: jobservice
                            cpuRequest: 500m
                            cpuLimit: 1000m
                            memoryRequest: 512Mi
                            memoryLimit: 2Gi
                          - name: portal
                            cpuRequest: 100m
                            cpuLimit: 300m
                            memoryRequest: 128Mi
                            memoryLimit: 256Mi
                          - name: redis
                            cpuRequest: 200m
                            cpuLimit: 500m
                            memoryRequest: 256Mi
                            memoryLimit: 1Gi
                          - name: registry
                            cpuRequest: 500m
                            cpuLimit: 1000m
                            memoryRequest: 512Mi
                            memoryLimit: 2Gi
                          - name: registryctl
                            cpuRequest: 200m
                            cpuLimit: 500m
                            memoryRequest: 256Mi
                            memoryLimit: 512Mi
                          - name: trivy
                            cpuRequest: 500m
                            cpuLimit: 2000m
                            memoryRequest: 1Gi
                            memoryLimit: 4Gi
                          - name: exporter
                            cpuRequest: 100m
                            cpuLimit: 300m
                            memoryRequest: 128Mi
                            memoryLimit: 256Mi
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: the name of the container the resource setting should be applied to
                            cpuRequest:
                              type: string
                              description: The CPU request for this container.
                            cpuLimit:
                              type: string
                              description: The CPU Limit for this container.
                            memoryRequest:
                              type: string
                              description: The memory request for this container.
                            memoryLimit:
                              type: string
                              description: The memory limit for this container.
                  network:
                    type: object
                    description: The network related configuration.
                    properties:
                      ipFamilies:
                        type: array
                        description: The array of network ipFamilies. Default [] is equivalent to have both ["IPv4","IPv6"]. Or you can choose one of ["IPv4"] or ["IPv6"]
                        default: []
                        items:
                          type: string
                          enum:
                            - IPv4
                            - IPv6
                  trace:
                    type: object
                    nullable: true
                    description: The tracing configuration for Harbor.
                    properties:
                      enabled:
                        type: boolean
                        description: Enable tracing for Harbor.
                        default: false
                      provider:
                        type: string
                        description: The provider type of tracing, jaeger or otel.
                        default: jaeger
                      sample_rate:
                        type: number
                        description: Set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth.
                        default: 1.0
                      namespace:
                        type: string
                        description: The namespace used to differentiate different harbor services.
                      attributes:
                        type: object
                        description: The attributes is a key value dict contains user defined attributes used to initialize trace provider.
                      jaeger:
                        type: object
                        nullable: true
                        description: Jaeger provider for Harbor tracing, it support two modes - collector mode & agent mode.
                        properties:
                          endpoint:
                            type: string
                            description: The endpoint of jaeger.
                            default: http://hostname:14268/api/traces
                          username:
                            type: string
                            description: The username of jaeger in collector mode.
                          password:
                            type: string
                            description: The password of jaeger in collector mode.
                          agent_host:
                            type: string
                            description: The agent_host of jaeger in agent mode.
                          agent_port:
                            type: integer
                            description: The agent_port of jaeger in agent mode.
                      otel:
                        type: object
                        nullable: true
                        description: Otel provider for Harbor tracing.
                        properties:
                          endpoint:
                            type: string
                            description: The endpoint of otel.
                            default: hostname:4318
                          url_path:
                            type: string
                            description: The url path of tracing with Otel.
                            default: /v1/traces
                          compression:
                            type: boolean
                            description: Whether to set compression when enabling tracing with Otel.
                            default: false
                          insecure:
                            type: boolean
                            description: Whether to connect the collector insecurely.
                            default: true
                          timeout:
                            type: integer
                            description: The max waiting time for the backend to process each spans batch, in seconds.
                            default: 10
                  cache:
                    type: object
                    description: The cache layer configurations for Harbor.
                    properties:
                      enabled:
                        type: boolean
                        description: Enable cache for Harbor.
                        default: false
                      expireHours:
                        type: integer
                        description: The expire hour of cache.
                        default: 24
                  redis:
                    type: object
                    description: redis configurations
                    required:
                      - type
                    properties:
                      type:
                        type: string
                        description: The type of redis, either internal as default, or external
                        default: internal
                      external:
                        type: object
                        nullable: true
                        description: external
                        required:
                          - addr
                          - password
                          - coreDatabaseIndex
                          - jobserviceDatabaseIndex
                          - registryDatabaseIndex
                          - trivyAdapterIndex
                        properties:
                          addr:
                            type: string
                            description: The address with port of external redis
                            default: "192.168.0.2:6379"
                          password:
                            type: string
                            description: The password of external redis
                          sentinelMasterSet:
                            type: string
                            description: The name of the set of Redis instances to monitor, it must be set to support redis+sentinel
                          coreDatabaseIndex:
                            type: integer
                            description: The coreDatabaseIndex must be 0 as the library Harbor
                            default: 0
                          jobserviceDatabaseIndex:
                            type: integer
                            description: The jobservice redis db index, 1 as default
                            default: 1
                          registryDatabaseIndex:
                            type: integer
                            description: The registry redis db index, 2 as default
                            default: 2
                          trivyAdapterIndex:
                            type: integer
                            description: The trivy redis db index, 5 as default
                            default: 5
                          harborDatabaseIndex:
                            type: integer
                            description: The split coreDatabase db into 2 seperate db, one is harborDatabaseIndex, but it can be configured to "6", this config is optional
                          cacheLayerDatabaseIndex:
                            type: integer
                            description: The split coreDatabase db into 2 seperate db, one is cacheLayerDatabaseIndex, but it can be configured to "7", this config is optional
                  concurrentRequestLimit:
                    type: object
                    nullable: true
                    description: The concurrent request limit configurations for different services.  The key of this object is the service name such as "registry".
                    properties:
                      registry:
                        type: object
                        description: The registry service related configuration.
                        required:
                          - enabled
                          - max
                        properties:
                          enabled:
                            type: boolean
                            description: Enable the concurrent request limit for registry service (/v2/*) when it's true
                            default: false
                          max:
                            type: integer
                            description: The max in flight requests to registry service (/v2/*)
                            default: 500
                  name:
                    type: string
                  configuration:
                    description: Regional Harbor configuration, host and clients supervisors.
                    type: object
                    properties:
                      name:
                        type: string
                        description: The name of the region.
                      configuration:
                        description: Regional Harbor configuration.
                        type: object
                        properties:
                          cache:
                            description: The cache layer configurations for Harbor.
                            properties:
                              enabled:
                                default: false
                                description: Enable cache for Harbor.
                                type: boolean
                              expireHours:
                                default: 24
                                description: The expire hour of cache.
                                type: integer
                            type: object
                          core:
                            description: Core component related configuration.
                            properties:
                              replicas:
                                default: 1
                                description: The replicas for the core component.
                                type: integer
                              secret:
                                description: Secret is used when core server communicates with other components.
                                type: string
                              xsrfKey:
                                description: The XSRF key. Must be a string of 32 chars.
                                type: string
                            required:
                              - secret
                              - xsrfKey
                            type: object
                          database:
                            description: Database component related configuration.
                            properties:
                              external:
                                description: external database configurations
                                properties:
                                  coreDatabase:
                                    default: registry
                                    description: The db name for external database
                                    type: string
                                  host:
                                    description: The hostname for external database
                                    type: string
                                  password:
                                    description: The password for external database
                                    type: string
                                  port:
                                    default: '5432'
                                    description: The port for external database
                                    type: string
                                  sslmode:
                                    default: disable
                                    description: sslmode for external database
                                    type: string
                                  username:
                                    default: postgres
                                    description: The username for external database
                                    type: string
                                required:
                                  - host
                                  - port
                                  - password
                                  - username
                                  - coreDatabase
                                type: object
                              maxIdleConns:
                                description: The initial value of maxIdleConns
                                type: integer
                              maxOpenConns:
                                description: The initial value of maxOpenConns
                                type: integer
                              password:
                                description: The initial password of the internal postgres database.
                                type: string
                              shmSizeLimit:
                                description: The initial value of shmSizeLimit
                                type: integer
                              type:
                                default: internal
                                description: The type of postgres dabasbase, either internal as default , or external
                                type: string
                            required:
                              - password
                              - type
                            type: object
                          exporter:
                            description: The configuration related to exporter.
                            properties:
                              cacheDuration:
                                description: The initial value of cacheDuration.
                                type: integer
                            type: object
                          harborAdminPassword:
                            description: The initial password of Harbor admin.
                            type: string
                          jobservice:
                            description: Jobservice component related configuration.
                            properties:
                              replicas:
                                default: 1
                                description: The replicas for the jobservice component.
                                type: integer
                              secret:
                                description: Secret is used when job service communicates with other components.
                                type: string
                            required:
                              - secret
                            type: object
                          logLevel:
                            type: string
                            description: The log level of core, exporter, jobservice, registry.
                            default: info
                            enum:
                              - debug
                              - info
                              - warning
                              - error
                              - fatal
                          metrics:
                            description: The metrics used by core, registry and exporter
                            properties:
                              core:
                                description: The core component related configuration.
                                properties:
                                  path:
                                    default: /metrics
                                    description: The path of the metrics.
                                    type: string
                                  port:
                                    default: 8001
                                    description: The port of the metrics.
                                    type: integer
                                type: object
                              enabled:
                                default: false
                                description: Enable the metrics when it's true
                                type: boolean
                              exporter:
                                description: The exporter component related configuration.
                                properties:
                                  path:
                                    default: /metrics
                                    description: The path of the metrics.
                                    type: string
                                  port:
                                    default: 8001
                                    description: The port of the metrics.
                                    type: integer
                                type: object
                              jobservice:
                                description: The jobservice component related configuration.
                                properties:
                                  path:
                                    default: /metrics
                                    description: The path of the metrics.
                                    type: string
                                  port:
                                    default: 8001
                                    description: The port of the metrics.
                                    type: integer
                                type: object
                              registry:
                                description: The registry component related configuration.
                                properties:
                                  path:
                                    default: /metrics
                                    description: The path of the metrics.
                                    type: string
                                  port:
                                    default: 8001
                                    description: The port of the metrics.
                                    type: integer
                                type: object
                            type: object
                          network:
                            description: The network related configuration.
                            properties:
                              ipFamilies:
                                type: array
                                description: The array of network ipFamilies. Default [] is equivalent to have both ["IPv4","IPv6"]. Or you can choose one of ["IPv4"] or ["IPv6"]
                                default: []
                                items:
                                  type: string
                            type: object
                          persistence:
                            description: 'The persistence is always enabled and a default StorageClass

                              is needed in the k8s cluster to provision volumes dynamically.

                              Specify another StorageClass in the "storageClass" or set "existingClaim"

                              if you have already existing persistent volumes to use.'
                            properties:
                              persistentVolumeClaim:
                                description: PersistentVolumeClaim related configuration.
                                properties:
                                  database:
                                    description: PersistentVolumeClaim related configuration for database component.
                                    properties:
                                      size:
                                        default: 1Gi
                                        description: Size of the PVC.
                                        type: string
                                      storageClass:
                                        default: ''
                                        description: 'Specify the "storageClass" used to provision the volume. Or the default

                                          StorageClass will be used(the default).

                                          Set it to "-" to disable dynamic provisioning'
                                        type: string
                                    type: object
                                  jobservice:
                                    description: PersistentVolumeClaim related configuration for jobservice component.
                                    properties:
                                      jobLog:
                                        description: PersistentVolumeClaim for jobservice log
                                        properties:
                                          size:
                                            default: 1Gi
                                            description: Size of the PVC.
                                            type: string
                                          storageClass:
                                            default: ''
                                            description: 'Specify the "storageClass" used to provision the volume. Or the default

                                              StorageClass will be used(the default).

                                              Set it to "-" to disable dynamic provisioning'
                                            type: string
                                        type: object
                                    type: object
                                  redis:
                                    description: PersistentVolumeClaim related configuration for redis component.
                                    properties:
                                      size:
                                        default: 1Gi
                                        description: Size of the PVC.
                                        type: string
                                      storageClass:
                                        default: ''
                                        description: 'Specify the "storageClass" used to provision the volume. Or the default

                                          StorageClass will be used(the default).

                                          Set it to "-" to disable dynamic provisioning'
                                        type: string
                                    type: object
                                  registry:
                                    description: PersistentVolumeClaim related configuration for registry component.
                                    properties:
                                      size:
                                        default: 10Gi
                                        description: Size of the PVC.
                                        type: string
                                      storageClass:
                                        default: ''
                                        description: 'Specify the "storageClass" used to provision the volume. Or the default

                                          StorageClass will be used(the default).

                                          Set it to "-" to disable dynamic provisioning'
                                        type: string
                                    type: object
                                  trivy:
                                    description: PersistentVolumeClaim related configuration for redis component.
                                    properties:
                                      size:
                                        default: 5Gi
                                        description: Size of the PVC.
                                        type: string
                                      storageClass:
                                        default: ''
                                        description: 'Specify the "storageClass" used to provision the volume. Or the default

                                          StorageClass will be used(the default).

                                          Set it to "-" to disable dynamic provisioning'
                                        type: string
                                    type: object
                                type: object
                            type: object
                          port:
                            description: Port related configuration.
                            properties:
                              https:
                                default: 443
                                description: The network port of the Envoy service in Contour or other Ingress Controller.
                                type: integer
                            type: object
                          redis:
                            description: redis configurations
                            properties:
                              external:
                                description: external
                                properties:
                                  cacheLayerDatabaseIndex:
                                    description: The split coreDatabase db into 2 seperate db, one is cacheLayerDatabaseIndex, but it can be configured to "7", this config is optional
                                    type: integer
                                  coreDatabaseIndex:
                                    default: 0
                                    description: The coreDatabaseIndex must be 0 as the library Harbor
                                    type: integer
                                  harborDatabaseIndex:
                                    description: The split coreDatabase db into 2 seperate db, one is harborDatabaseIndex, but it can be configured to "6", this config is optional
                                    type: integer
                                  jobserviceDatabaseIndex:
                                    default: 1
                                    description: The jobservice redis db index, 1 as default
                                    type: integer
                                  registryDatabaseIndex:
                                    default: 2
                                    description: The registry redis db index, 2 as default
                                    type: integer
                                  sentinelMasterSet:
                                    description: The name of the set of Redis instances to monitor, it must be set to support redis+sentinel
                                    type: string
                                  trivyAdapterIndex:
                                    default: 5
                                    description: The trivy redis db index, 5 as default
                                    type: integer
                                required:
                                  - coreDatabaseIndex
                                  - jobserviceDatabaseIndex
                                  - registryDatabaseIndex
                                  - trivyAdapterIndex
                                type: object
                            required: []
                            type: object
                          registry:
                            description: Registry component related configuration.
                            properties:
                              replicas:
                                default: 1
                                description: The replicas for the registry component.
                                type: integer
                              secret:
                                description: Secret is used to secure the upload state from client and registry storage backend.
                                type: string
                            required:
                              - secret
                            type: object
                          secretKey:
                            description: The secret key used for encryption. Must be a string of 16 chars.
                            type: string
                          tlsCertificate:
                            description: The tls certificate for the harbor FQDN.
                            properties:
                              signingSettings:
                                type: object
                                properties:
                                  additionalDnsNames:
                                    type: array
                                    items:
                                      type: string
                                    description: Additional DNS names to include in the certificate signing request (CSR)
                                  ipAddresses:
                                    type: array
                                    items:
                                      type: string
                                    description: IP addresses to include in the certificate signing request (CSR)
                            type: object
                          trace:
                            description: The tracing configuration for Harbor.
                            properties:
                              attributes:
                                description: The attributes is a key value dict contains user defined attributes used to initialize trace provider.
                                type: object
                              enabled:
                                default: false
                                description: Enable tracing for Harbor.
                                type: boolean
                              jaeger:
                                description: Jaeger provider for Harbor tracing, it support two modes - collector mode & agent mode.
                                properties:
                                  agent_host:
                                    description: The agent_host of jaeger in agent mode.
                                    type: string
                                  agent_port:
                                    description: The agent_port of jaeger in agent mode.
                                    type: integer
                                  endpoint:
                                    default: http://hostname:14268/api/traces
                                    description: The endpoint of jaeger.
                                    type: string
                                  password:
                                    description: The password of jaeger in collector mode.
                                    type: string
                                  username:
                                    description: The username of jaeger in collector mode.
                                    type: string
                                type: object
                              namespace:
                                description: The namespace used to differentiate different harbor services.
                                type: string
                              otel:
                                description: Otel provider for Harbor tracing.
                                properties:
                                  compression:
                                    default: false
                                    description: Whether to set compression when enabling tracing with Otel.
                                    type: boolean
                                  endpoint:
                                    default: hostname:4318
                                    description: The endpoint of otel.
                                    type: string
                                  insecure:
                                    default: true
                                    description: Whether to connect the collector insecurely.
                                    type: boolean
                                  timeout:
                                    default: 10
                                    description: The max waiting time for the backend to process each spans batch, in seconds.
                                    type: integer
                                  url_path:
                                    default: /v1/traces
                                    description: The url path of tracing with Otel.
                                    type: string
                                type: object
                              provider:
                                default: jaeger
                                description: The provider type of tracing, jaeger or otel.
                                type: string
                              sample_rate:
                                default: 1.0
                                description: Set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth.
                                type: number
                            type: object
                          trivy:
                            description: Trivy component related configuration.
                            properties:
                              enabled:
                                default: true
                                description: Whether to install Trivy scanner.
                                type: boolean
                              gitHubToken:
                                default: ''
                                description: the GitHub access token to download Trivy DB.
                                type: string
                              offlineScan:
                                default: false
                                description: The offlineScan option prevents Trivy from sending API requests to identify dependencies.
                                type: boolean
                              replicas:
                                default: 1
                                description: The replicas for the trivy component.
                                type: integer
                              skipUpdate:
                                default: false
                                description: The flag to disable Trivy DB downloads from GitHub.
                                type: boolean
                              timeout:
                                default: ''
                                description: The timeout set for trivy scanner, it should be a number followed by a letter like "h", "m", "s", or "ms", i.e. 1h, 5m, 60s, 1000ms.
                                type: string
                              tmpdir:
                                default: ''
                                description: If /tmp doesn't work for you, you can change it by setting this environment variable. Normally would be /home/scanner
                                type: string
                            type: object
              clientSupervisors:
                description: The names of the Harbor client supervisors.
                type: array
                items:
                  type: string
            required:
              - hostSupervisor
              - clientSupervisors
      required:
        - regions
